import Router from 'vue-router'

const home = resolve => {require(['./home'], resolve)};
const demo1 = resolve => {require(['./page/demo1'], resolve)};
const demo2 = resolve => {require(['./page/demo2'], resolve)};
const demo3 = resolve => {require(['./page/demo3'], resolve)};
const demo4 = resolve => {require(['./page/demo4'], resolve)};
const demo5 = resolve => {require(['./page/demo5'], resolve)};
const demo6 = resolve => {require(['./page/demo6'], resolve)};
const demo7 = resolve => {require(['./page/demo7'], resolve)};
const demo8 = resolve => {require(['./page/demo8'], resolve)};
const demo9 = resolve => {require(['./page/demo9'], resolve)};
const demo0 = resolve => {require(['./page/demo0'], resolve)};
const demo11 = resolve => {require(['./page/demo11'], resolve)};
const demo12 = resolve => {require(['./page/demo12'], resolve)};



const route = new Router({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes:[
        { 
            path: '/home', component: home, children:[
                { path: '/demo1', component: demo1 },
                { path: '/demo2', component: demo2 },
                { path: '/demo3', component: demo3 },
                { path: '/demo4', component: demo4 },
                { path: '/demo5', component: demo5 },
                { path: '/demo6', component: demo6 },
                { path: '/demo7', component: demo7 },
                { path: '/demo8', component: demo8 },
                { path: '/demo9', component: demo9 },
                { path: '/demo0', component: demo0 },
                { path: '/demo11', component: demo11 },
                { path: '/demo12', component: demo12 }
            ],
            path:"*", redirect:"/demo1"
        },
       
    ]
});

export default route;